Suspicious For Statement (SFS)

Description:

SFS checks for iterator variable usage. It tries to detect a situation when different variables are used in initialization, condition, and the increment part of a for loop. Most likely, it means that the wrong variable is used.

The option, Check for condition, specifies whether for loop conditions are analyzed for variable usage.

Incorrect:

for (int i = 0; i < arr.Length; i++) { 
    for (int j = 0; j < arr[i].Length; i++) {
         ...
    }
}

Correct:

for (int i = 0; i < arr.Length; i++) { 
    for (int j = 0; j < arr[i].Length; j++) { 
         ...
    }
}